import { getCommodityDetail } from '../../../../services/commodity';
import * as log from '../../../../utils/log';
import { translateItemData } from '../../../../utils/utils'

Component({
  mixins: [],
  data: {
    itemInfo: {}
  },
  props: {
    goodsinfo: {}
  },
  didMount() {
    this.setData({
      itemInfo: translateItemData(this.props.goodsinfo)
    })
  },
  deriveDataFromProps(nextProps) {
    console.log('deriveDataFromProps')
  },
  methods: {
    entriesTap(event) {
      console.log(event)
      if (event.target.dataset.url) {
        my.navigateTo({
          url: event.target.dataset.url
        })
      }
    }
  },

});
